namespace WCFThree.Entity
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;
    using System.Runtime.Serialization;
    [Table("teacher")]
    [DataContract(IsReference = true)]
    public partial class teacher
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public teacher()
        {
            courses = new HashSet<course>();
        }

        [Key]
        [StringLength(3)]
        public string tno { get; set; }

        [Required]
        [StringLength(4)]
        public string tname { get; set; }

        public DateTime? tbirthday { get; set; }

        [StringLength(6)]
        public string profession { get; set; }

        [Required]
        [StringLength(10)]
        public string department { get; set; }

        [StringLength(2)]
        public string tsex { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<course> courses { get; set; }
    }
}
